docs: fix outdated content across docs/ and root-level docs/scripts#6662
docs: fix outdated content across docs/ and root-level docs/scripts#6662Little-Peony wants to merge 9 commits intotronprotocol:developfrom
Conversation
implement-a-customized-actuator (EN+ZH): - Fix test lifecycle: @Before/@after → @BeforeClass/@afterclass so the Spring context is created only once per test class, not per test method - Fix Args initialization order: Args.setParam() must be called before Args.getInstance() to avoid passing a stale unconfigured instance to appTest.initServices() - Replace hardcoded dbPath with @ClassRule TemporaryFolder to keep test directories isolated and auto-cleaned - Add @rule Timeout to guard against hangs - Remove the specific protoc v3.4.0 version note; point readers to the version declared in build.gradle instead modular-deployment (EN+ZH): - Replace CMS GC flags (-XX:+UseConcMarkSweepGC, -XX:+CMSParallelRemarkEnabled, -XX:+CMSScavengeBeforeRemark) that were removed in JDK 14 and would cause startup failures on JDK 17 (required for ARM64) - Add -Xms/-Xmx to the example and note JDK 8/17 compatibility modular-introduction (EN+ZH): - Update module count from six to eight - Add descriptions for the crypto and plugins modules Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
implement-a-customized-actuator (EN+ZH): - SumContract field number: 52 is already taken by MarketSellAssetContract; change to 60 (next available number after CancelAllUnfreezeV2Contract=59) - SumActuator: add missing static import for TRANSFER_FEE from Parameter.ChainConstant (not inherited from AbstractActuator) - SumActuatorTest: Application does not have addService()/initServices()/ startServices()/shutdownServices(); replace with startup()/shutdown() which are the actual API methods Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
implement-a-customized-actuator (EN+ZH): - Add the missing 'import "core/contract/math_contract.proto"' step in api.proto; without it the proto compiler cannot resolve SumContract in the InvokeSum RPC definition (compile failure) - Add a note explaining that SumActuator must live in org.tron.core.actuator: TransactionRegister.registerActuator() uses Reflections to scan that package at startup and auto-registers every AbstractActuator subclass via the super() constructor call into TransactionFactory Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t guide modular-deployment (EN+ZH): - Remove 'will be deprecated' note for java -jar FullNode.jar: README shows it as a fully supported launch method alongside the script - Add explicit platform note: Linux and macOS only, Windows not supported - Remove '*.bat on Windows' startup instruction: Windows is not supported per README line 39 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- start.sh: fix always-false `if $darwin` → `if [[ "$(uname)" == "Darwin" ]]` - start.sh: replace `$(\`echo fn\`)` anti-pattern with `$(fn)` in 8 call sites - start.sh: replace removed CMS GC flags with G1GC - start.sh: fix always-true `ALL_OPT_LENGTH -eq 0 || -gt 0` and duplicate restart - ver.sh: remove `set -x` debug mode left in by mistake - ver.sh: fix Version.java path to framework/src/main/java/org/tron/program/Version.java Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- gen.sh: fix proto paths, add shebang and -I include flags, split core/api - build.md: rewrite with current JDK matrix; deduplicate vs README via links - run.md: rewrite to remove dead links, fix SR private key security issue, remove gradle run -Pwitness and 2018-era log output - quickstart.md: remove deprecated Solidity Node port/references; mark docker-tron-quickstart as community-maintained - CONTRIBUTING.md: replace Travis CI with GitHub Actions; fix commit title length from 50 to 10-72 chars to match PR Title Format section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|  | ||
|
|
||
| A modularized java-tron consists of six modules: framework, protocol, common, chainbase, consensus and actuator. The function of each module is elaborated below. | ||
| A modularized java-tron consists of eight modules: framework, protocol, common, chainbase, consensus, actuator, crypto and plugins. The function of each module is elaborated below. |
There was a problem hiding this comment.
The module count should be nine, not eight — platform is missing. From settings.gradle:
framework, chainbase, protocol, actuator, consensus, common, crypto, plugins, platform
Please add a description for the platform module and update the count in both EN and ZH files.
| @@ -1,81 +1,54 @@ | |||
| # How to Build | |||
There was a problem hiding this comment.
After the rewrite, both build.md and run.md are mostly thin wrappers that point back to the README. Maintaining multiple files that say "see README" adds indirection for readers and maintenance burden (they can easily drift out of sync again — which is how they got stale in the first place).
Suggestion: consider removing build.md and run.md entirely, and moving the unique content (IntelliJ IDEA setup steps, jitpack dependency snippet) into the README or a CONTRIBUTING.md section. This would be a net reduction in maintenance surface.
|
Suggest to delete build.md, gen.sh, run.md and some unused file totally, specify the alternative document in README.md. There are too many reduant files in root level. |
|
The PR title and commits are scoped to docs:, but the changeset also modifies shell scripts (start.sh, ver.sh, gen.sh) with functional bug fixes (e.g., undefined $darwin variable, tautological condition, CMS→G1GC). Consider either splitting into two PRs (docs vs. scripts) or updating the title/scope to reflect the actual changes, e.g., docs, chore(scripts): .... |
|
|
||
|
|
||
| versionPath="src/main/java/org/tron/program/Version.java" | ||
| versionPath="framework/src/main/java/org/tron/program/Version.java" |
There was a problem hiding this comment.
ver.sh has two invocation paths:
- Direct execution from the repo root:
./ver.sh— the new pathframework/src/main/java/...resolves correctly. - Via Gradle:
./gradlew version— the task is defined inframework/build.gradlewithcommandLine 'bash', '-c', '../ver.sh', so the working directory isframework/. The new path resolves toframework/framework/src/main/java/.../Version.java, which does not exist:
warning: could not open directory 'framework/framework/src/main/java/org/tron/program/': No such file or directory
fatal: pathspec 'framework/src/main/java/org/tron/program/Version.java' did not match any files
The original relative path src/main/java/... was actually correct for the Gradle invocation.
Suggestion: add cd "$(dirname "$0")" at the top of ver.sh to anchor the working directory to the script's location (i.e., the repo root), so both invocation paths work correctly.
Summary
Documentation and script cleanup. No production code modified.
docs/ — six files under
docs/implement-a-customized-actuator (EN + ZH)
SumContractfield number:52→60(52 is already taken byMarketSellAssetContract)import "core/contract/math_contract.proto"toapi.protoimport static org.tron.core.config.Parameter.ChainConstant.TRANSFER_FEE@Before/@After→@BeforeClass/@AfterClassArgsinitialization order:Args.setParam()must be called beforeArgs.getInstance()"output-directory"→@ClassRule TemporaryFolderaddService()/initServices()/startServices()/shutdownServices()withstartup()/shutdown()TransactionRegister.registerActuator()scansorg.tron.core.actuatorat startup via Reflections — no manual registration needed@Rule Timeoutmodular-deployment (EN + ZH)
java -jar FullNode.jar*.batreferences (Windows is not supported per README)-XX:+UseConcMarkSweepGCetc.) removed in JDK 14 with JDK 8/17-compatible optionsmodular-introduction (EN + ZH)
cryptoandpluginsdescriptionsRoot-level docs and scripts
gen.sh
protocol/src/main/protos/; added required-Iinclude flags; split into two invocations (core + api) for correct import resolution; set output toprotocol/src/main/javabuild.md
run.md
-pCLI flag), remove non-existentgradlew run -Pwitnesstask and 2018-era log outputquickstart.md
docker-tron-quickstartas community-maintainedCONTRIBUTING.md
Travis CIwithGitHub Actions; fix commit title length guidance from 50 to 10–72 chars to match the PR Title Format sectionstart.sh
if $darwin→if [[ "$(uname)" == "Darwin" ]]$(`echo fn`)anti-pattern with$(fn)at 8 call sitesALL_OPT_LENGTH -eq 0 || -gt 0and duplicaterestartcallver.sh
set -xdebug mode; fixedVersion.javapath toframework/src/main/java/org/tron/program/Version.javaTest plan
SumContract = 60does not conflict with any existingContractTypevalue inTron.protoapi.protowith the new importgen.shcompiles protos successfully from project rootstart.shsyntax check passes (bash -n start.sh)🤖 Generated with Claude Code